Article Purchasing
Frequency:
Article purchasing master data changes are required to be sent in near real-time. Any change to an interface field in the external system should trigger the interface.
Expected data:
If the article ID used for purchasing is different from the article ID, the purchasing article ID is expected.
Technical:
Both the article and the purchasing article must already exist in DSMDS.
POST sets the purchasing article of an article, replacing any previous value.
DELETE removes the purchasing article of an article.
A record that produces a warning is skipped, and the other records are still processed. A missing article_id produces an "article ID is missing" warning; an empty string ID produces a "not found" warning instead.
Records are processed one at a time, not in a single transaction. If purchasing_article_id is missing in a POST record, the request fails with 409, but records processed before it stay saved.
POST https://{url}/articles/purchasing/v1
Set the purchasing article of articles.
Request Body
The request body is a JSON array of objects with the following fields.
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Article unique identifier in the external system |
| purchasing_article_id | string | Yes | Article ID used on purchase orders when sent to a supplier. Must be an existing article in DSMDS. If missing, the request fails with 409 |
Request Example
[
{
"article_id": "0001",
"purchasing_article_id": "0002"
},
{
"article_id": "0047",
"purchasing_article_id": "0048"
}
]
Response
200: OK — Success
{
"success": true,
"message": "",
"data": null,
"warnings": []
}
200: OK — Success with warnings
{
"success": true,
"message": null,
"data": null,
"warnings": [
"Article purchasing not saved, article with ID '0001' not found for client 20",
"Article purchasing not saved, purchasing article with ID '0047' not found for client 20",
"Article purchasing not saved, article ID is missing"
]
}
The "purchasing article not found" warning currently shows the article_id value, not the purchasing_article_id that was not found.
200: OK — Error
{
"success": false,
"message": "Failed to map JSON",
"data": null,
"warnings": []
}
DELETE https://{url}/articles/purchasing/v1
Remove the purchasing article of articles.
Request Body
The request body is a JSON array of objects with the following fields.
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Article unique identifier in the external system |
Request Example
[
{
"article_id": "0001"
},
{
"article_id": "0047"
}
]
Response
200: OK — Success
{
"success": true,
"message": "",
"data": null,
"warnings": []
}
200: OK — Success with warnings
{
"success": true,
"message": null,
"data": null,
"warnings": [
"Article purchasing not deleted, article with ID '0001' not found for client 20",
"Article purchasing not deleted, article ID is missing"
]
}
200: OK — Error
{
"success": false,
"message": "Failed to map JSON",
"data": null,
"warnings": []
}